#ifndef TEXT1_H
#define TEXT1_H

#include <iostream>
#include <vector>
#include <QDebug>
class text1
{
public:
    text1();
    void addX(double value);
    void addY(double value);
    void apply(int n,double x);
    double getLagrange_base(int i);
    double getResult();
    void clear();
private:
    std::vector<double> x;
    std::vector<double> y;
    std::vector<double> Lbase;
    void Lagrange_base(int i,int n,double x);
};

#endif // TEXT1_H
